/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-01-28
 * Time: 17:19
 */
public class Test {
    public static void main(String[] args) {
        MyBinaryTree myBinaryTree = new MyBinaryTree();
        MyBinaryTree.TreeNode root = myBinaryTree.createTree();
        System.out.println(root);
        myBinaryTree.preOrder(root);
        System.out.println();
        myBinaryTree.inOrder(root);
        System.out.println();
        myBinaryTree.postOrder(root);
        System.out.println();
        System.out.println(myBinaryTree.size(root));
        System.out.println(myBinaryTree.size1(root));
        System.out.println(myBinaryTree.getLeafNodeCount(root));
        System.out.println(myBinaryTree.getLeafNodeCount1(root));
        System.out.println((myBinaryTree.getKLevelNodeCount(root,3)));
        System.out.println(myBinaryTree.getHeight(root));
        MyBinaryTree.TreeNode ret = myBinaryTree.find(root,'B');
        System.out.println(ret.val);
        System.out.println("层序遍历：");
        myBinaryTree.levelOrder(root);
        System.out.println();
        System.out.println(myBinaryTree.isCompleteTree(root));
    }

}

